import { createRouter, createWebHashHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";
import OrderView from "../views/OrderView.vue";
import InfoView from "../views/InfoView.vue";
import MyView from "../views/MyView.vue";

const routes = [
  { path: "/", redirect: "/order" }, // 默认打开点餐页
  { path: "/home", name: "Home", component: HomeView },
  { path: "/order", name: "Order", component: OrderView },
  { path: "/info", name: "Info", component: InfoView },
  { path: "/my", name: "My", component: MyView },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
